package Lee_code;

public class Lee_739 {

    public int[] dailyTemperatures(int[] temperatures) {
        int len = temperatures.length;
        int[] temp = new int[len];

        for(int i=0; i<len-1; i++)
        {
            int next=0;
            for(int j=i+1; j<len; j++)
            {
                if(temperatures[i]<temperatures[j])
                {
                    next = j-i;
                    temp[i] = next;
                    continue;
                }
            }
        }
        temp[len-1]=0;

        return  temp;

    }
    public static void main(String[] args) {

    }
}
